package web.entitys;

import com.github.pagehelper.PageInfo;
import spider.entitys.Novel;

/**
 * created by yb
 * on 2017/10/20.
 **/
public class PageResponse {
    private Object data;
    private long total;
    private int pages;

    public static PageResponse sucess( PageInfo< Novel > list){
        PageResponse ret = new PageResponse();
        ret.setTotal( list.getTotal() );
        ret.setData( list.getList() );
        ret.setPages( list.getPages() );
        return ret;
    }

    //<editor-fold desc="set get">

    public int getPages() {
        return pages;
    }

    public void setPages( int pages ) {
        this.pages = pages;
    }

    public Object getData() {
        return data;
    }

    public void setData( Object data ) {
        this.data = data;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal( long total ) {
        this.total = total;
    }
    //</editor-fold>
}
